﻿// JavaScript Document
function MyTime(){
	var day1;
    var mydate= new Date();
	var year=mydate.getFullYear();
	var month=mydate.getMonth()+1;
	var date=mydate.getDate();
	var s=year+"年"+month+"月"+date+"日";
    var day=mydate.getDay();
	switch(day){
		case 0: day1= "日";
		break;
		case 1: day1= "一";
		break;
		case 2: day1= "二";
		break;
		case 3: day1= "三";
		break;
		case 4: day1= "四";
		break;
		case 5: day1= "五";
		break;
		case 6: day1= "六";
		break;
		}
	var s1="星期"+day1;
	var time=mydate.toLocaleTimeString();
	var Time="&nbsp;&nbsp;"+s+"&nbsp;"+s1+"&nbsp;"+time;
	$(".tit_time").html(Time);
}
setInterval("MyTime()",1000);
document.onreadystatechange = subSomething;
	function subSomething(){ 
		if(document.readyState == "complete"||document.readyState == "interactive")
		{
			// $("#show").attr("src","rd.html");
		}
	} 
$(document).ready(function(e) {
	// $("#show").attr("src","rd.html");
    MyTime();
	var H=$(window).height();
	var W=$(window).width();
	var h1=H-89;
	var h2=h1-57;
	var h3=H-120;
	var w1=W-240;
	var h4=h3-5;
	$(".left_layout").height(h1);
	$(".left_first_ul").height(h2);
	$(".right_content").height(h3);
	$(".right_layout").width(w1);
	$(".hidden").height(h1);
	$("iframe").height(h4);
	$(window).resize(function(e) {
		 H=$(window).height();
		 W=$(window).width();
		 h1=H-89;
		 h2=h1-57;
		 h3=H-120;
		 w1=W-240;
		if($(".right_tit").css("display")=="none"){
			h4=h3-5;
		}else{
		 	h4=h3-5-$(".right_tit").height();
			}
        $(".left_layout").height(h1);
		$(".left_first_ul").height(h2);
		$(".right_content").height(h3);
		if($(".hidden_img").hasClass("show_img")){
			$(".right_layout").width(W);
		}else{
			$(".right_layout").width(w1);
		}
		$(".hidden").height(h1);
		$("iframe").height(h4);
    });
	$("a>.tit_img").hover(function(){
		if($("a>.tit_img").index($(this))==0){
			$(this).attr("src","/static/skin/images/index_tithover_icon_06.png");
			$(this).next(".back_ts").fadeIn();
			}else if($("a>.tit_img").index($(this))==1){
			$(this).attr("src","/static/skin/images/index_tithover_icon_09.png");
			$(this).next(".back_ts").fadeIn();
			}else{
			$(this).attr("src","/static/skin/images/index_tithover_icon_11.png");
			$(this).next(".back_ts").fadeIn();
			}
		
		},function(){
			if($("a>.tit_img").index($(this))==0){
				$(this).attr("src","/static/skin/images/index_tit_icon_06.png");
				$(this).next(".back_ts").fadeOut();
				}else if($("a>.tit_img").index($(this))==1){
				$(this).attr("src","/static/skin/images/index_tit_icon_09.png");
				$(this).next(".back_ts").fadeOut();
				}else{
				$(this).attr("src","/static/skin/images/index_tit_icon_11.png");
				$(this).next(".back_ts").fadeOut();
				}
		});
	$(".left_first_a").hover(function(){
			$(this).css({background:"url(/static/skin/images/left-button_11.png) no-repeat",color:"#FFF"});
		},function(){
			if($(this).hasClass("is_click")){}else{
			$(this).css({background:"url(/static/skin/images/left-button_07.png) no-repeat",color:"#1b1b1b"});
			}
		});
	$(".left_first_a").click(function(){
		if($(this).hasClass("is_click")){
			$(this).removeClass("is_click");
			$(this).next(".left_second_ul").animate({height:"hide",width:"0px"});
		}else{
			$(this).addClass("is_click");
			$(this).next(".left_second_ul").animate({height:"show",width:"215px"});
		}
			$(".left_first_a").not(this).removeClass("is_click");
			$(".left_first_a").not(this).css({background:"url(/static/skin/images/left-button_07.png) no-repeat",color:"#1b1b1b"});
			$(".left_first_a").not(this).next(".left_second_ul").animate({height:"hide",width:"0px"});
		});
	$(".left_second_a").hover(function(){
			$(this).css({background:"url(/static/skin/images/left_buttontwobg_03.png) no-repeat",color:"#000"}).css("font-weight","bold");
		},function(){
			if($(this).hasClass("click_yes")){}else{
			$(this).css({background:"url(/static/skin/images/left_buttontwobg_09.png) no-repeat",color:"#1b1b1b"}).css("font-weight","normal");
			}
		})
	$(".left_second_a").click(function(){
			if($(this).hasClass("click_yes")){
				$(this).removeClass("click_yes");
				$(this).next(".left_third_ul").animate({height:"hide",width:"0px"});	
			}else{
				$(this).addClass("click_yes");
				$(this).next(".left_third_ul").animate({height:"show",width:"210px"});
			}
			$(this).parents(".left_second_ul").find(".left_second_a").not($(this)).removeClass("click_yes");
			$(this).parents(".left_second_ul").find(".left_second_a").not($(this)).css({background:"url(skin/images/left_buttontwobg_09.png) no-repeat",color:"#1b1b1b"}).css("font-weight","normal");
			$(this).parents(".left_second_ul").find(".left_second_a").not($(this)).next(".left_third_ul").animate({height:"hide",width:"0px"});
		});
	$(".left_third_a").hover(function(){
			$(this).addClass("left_third_hover");
		},function(){
			if($(this).hasClass("click")){}else{
			$(this).removeClass("left_third_hover");
			}
		});
	$(".left_third_a").click(function(){
			if($(this).hasClass("click")){
				$(this).removeClass("click");
			}else{
				$(this).addClass("click");
			}
			$(".left_third_a").not(this).removeClass("click");
			$(".left_third_a").not(this).removeClass("left_third_hover");
			var s1="当前位置："
			var s2=$(".is_click").text();
			var s3=$(this).parents(".left_third_ul").prev(".left_second_a").text();
			var s4=$(this).text();
			var s=s1+"&nbsp;"+s2+"&nbsp;"+s3+"&nbsp;>>"+s4;
			$(".tit_bg").html(s);
			$(".right_tit").show();
			h4=h3-35;
			$("iframe").height(h4);
		});
	$(".manage_img").click(function(){
			$(".left_layout").hide();
			$(".hidden_img").addClass("show_img");
			$(".right_layout").width(W);
		});
	$(".hidden_img").click(function(){
			$(".left_layout").show();
			$(this).removeClass("show_img");
			$(".right_layout").width(w1);
		});
	$(".tit_img").eq(2).parent("a").click(function(){
			// $("#show").attr("src","rd.html");
			$(".right_tit").hide();
		});
	
});